//
//  VPHTTPRequestOperationManager+Private.m
//  VPPublicUntilitisForPod
//
//  Created by verne on 2017/3/20.
//  Copyright © 2017年 vernepung. All rights reserved.
//

#import "VPHTTPRequestOperationManager+Private.h"

@implementation VPHTTPRequestOperationManager (Private)

- (NSPredicate *)getPredicateWithModelState:(kVPDownloadState)state{
    NSString *searchStr = [NSString stringWithFormat:@"downloadModel.downloadState == %zd",state];
    return [self getPredicateWithString:searchStr];
}

- (NSPredicate *)getPredicateWithModelMainId:(NSString *)mainId{
    NSString *searchStr = [NSString stringWithFormat:@"downloadModel.mainId == '%@'",mainId];
    return [self getPredicateWithString:searchStr];
}

- (NSPredicate *)getPredicateWithState:(kVPDownloadState)state{
    NSString *searchStr = [NSString stringWithFormat:@"downloadState == %zd",state];
    return [self getPredicateWithString:searchStr];
}

- (NSPredicate *)getPredicateWithMainId:(NSString *)mainId{
    NSString *searchStr = [NSString stringWithFormat:@"mainId == '%@'",mainId];
    return [self getPredicateWithString:searchStr];
}

- (NSPredicate *)getPredicateWithString:(NSString *)str{
    NSPredicate *predicate = [NSPredicate predicateWithFormat:str];
    return predicate;
}
@end
